#define VERSION					"Beta 1.0.0.6"
#define DEBUG					false
//#define CPrefix					"\x04[\x05NCS RPG\x04]\x01 %T"
#define MAX_SKILLS				32
#define MAX_SKILL_NAME_LENGTH	32
#define MAX_SKILL_DESC_LENGTH	256
// Database ------------------------------------------------------------------------------------------------------------------
new bool:bIsConnectedToDB;

new Handle:SQL_hDB = INVALID_HANDLE;
// Player --------------------------------------------------------------------------------------------------------------------
new PlayerLevel[MAXPLAYERS+1];
new PlayerXP[MAXPLAYERS+1];
new PlayerReqXP[MAXPLAYERS+1];
new PlayerCredits[MAXPLAYERS+1];
new PlayerSkill[MAXPLAYERS+1][MAX_SKILLS];

new bool:ClientLoaded[MAXPLAYERS+1];
// Offsets -------------------------------------------------------------------------------------------------------------------
new m_clrRender;
// ---------------------------------------------------------------------------------------------------------------------------
new iMaxHP[MAXPLAYERS+1];

new Float:fPlayerSpeed[MAXPLAYERS+1];		// Не используется для SetSpeed, используется для заморозки!
new Float:fPlayerSlow[MAXPLAYERS+1];
new Float:fFreeze[MAXPLAYERS+1];
new Float:fMaxSpeed[MAXPLAYERS+1];

new Handle:hTimerFreeze[MAXPLAYERS+1] = {INVALID_HANDLE, ...};
// Skills --------------------------------------------------------------------------------------------------------------------
new CountSkills;
new SkillMaxLevel[MAX_SKILLS];
new SkillCost[MAX_SKILLS];
new SkilliCost[MAX_SKILLS];

new String:SkillShortname[MAX_SKILLS][MAX_SKILL_NAME_LENGTH];
// Logs ----------------------------------------------------------------------------------------------------------------------
//new String:Log_DB[PLATFORM_MAX_PATH];
// Config --------------------------------------------------------------------------------------------------------------------
new Handle:hConfig = INVALID_HANDLE;
// API -----------------------------------------------------------------------------------------------------------------------
new Handle:hFWD_OnSkillsRegister = INVALID_HANDLE;
new Handle:hFWD_OnClientLoaded = INVALID_HANDLE;
new Handle:hFWD_OnDBConnected = INVALID_HANDLE;
// Damage --------------------------------------------------------------------------------------------------------------------
#define DMG_GENERIC			0
#define DMG_CRUSH			(1 << 0)
#define DMG_BULLET			(1 << 1)
#define DMG_SLASH			(1 << 2)
#define DMG_BURN			(1 << 3)
#define DMG_VEHICLE			(1 << 4)
#define DMG_FALL			(1 << 5)
#define DMG_BLAST			(1 << 6)
#define DMG_CLUB			(1 << 7)
#define DMG_SHOCK			(1 << 8)
#define DMG_SONIC			(1 << 9)
#define DMG_ENERGYBEAM		(1 << 10)
#define DMG_PREVENT_PHYSICS_FORCE	(1 << 11)
#define DMG_NEVERGIB		(1 << 12)
#define DMG_ALWAYSGIB		(1 << 13)
#define DMG_DROWN			(1 << 14)
#define DMG_TIMEBASED		(DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_RADIATION | DMG_DROWNRECOVER | DMG_ACID | DMG_SLOWBURN)
#define DMG_PARALYZE		(1 << 15)
#define DMG_NERVEGAS		(1 << 16)
#define DMG_POISON			(1 << 17)
#define DMG_RADIATION		(1 << 18)
#define DMG_DROWNRECOVER	(1 << 19)
#define DMG_ACID			(1 << 20)
#define DMG_SLOWBURN		(1 << 21)
#define DMG_REMOVENORAGDOLL	(1 << 22)
#define DMG_PHYSGUN			(1 << 23)
#define DMG_PLASMA			(1 << 24)
#define DMG_AIRBOAT			(1 << 25)
#define DMG_DISSOLVE		(1 << 26)
#define DMG_BLAST_SURFACE	(1 << 27)
#define DMG_DIRECT			(1 << 28)
#define DMG_BUCKSHOT		(1 << 29)